export default {
  data(){
    return{
      item: {
        name: "golden dog",
        itemId: "",
        productId : "",
        catId : "",
        nowPrice : 54,
        oldPrice : 90,
        supplier : "",
        descn : "beautiful,cute,clever",
        image : "../../static/picture/cart-1.jpg"
      },
      searchList:[
        {
          name: "golden dog",
          itemId: "",
          productId : "",
          catId : "",
          nowPrice : 54,
          oldPrice : 90,
          supplier : "",
          descn : "beautiful,cute,clever",
          image : "../../static/picture/cart-1.jpg"
        }
      ]
    }

  },
  methods:{
    getSearchList(){

    },
    //添加到购物车
    addCart(itemId){

    },
    addWish(itemId){
    },
    chooseItem(itemId){
      for(var i = 0;i < this.itemList.length;i++){
        if(itemId == this.itemList[i].itemId){
          this.item = this.itemList[i];
          break;
        }
      }
    }
  }
}
